/*
 * UdpServer.h
 *
 *  Created on: Jun 29, 2024
 *      Author: root
 */

#ifndef UDPSERVER_H_
#define UDPSERVER_H_
#include "Thread.h"
#include "Common.h"

extern char *g_recv_buf;
extern char *g_send_buf;

class CUdpServer:public Thread
{
public:
	CUdpServer();
	virtual ~CUdpServer();

	virtual void run();
	int Close();

	static  void* net_data_recv(void* args);
	static  void* pl_data_recv(void* args);

	pthread_t m_net_recv_id;
	pthread_t m_pl_recv_id;

	char *m_ip;
	int m_port;

	NET_CMD m_net_cmd;
	NET_DATA m_net_data;




};

#endif /* UDPSERVER_H_ */
